CMAKE_MINIMUM_REQUIRED (VERSION 3.0)

PROJECT (ExampleProject C CXX)

SET (CMAKE_BUILD_TYPE Release)
SET (CMAKE_CXX_STANDARD 17)
SET (CMAKE_CXX_STANDARD_REQUIRED ON)

IF (WIN32)
	ADD_COMPILE_OPTIONS ( /permissive- )	# stick to C++ standards (turn off Microsoft-specific extensions)
ELSE ()
	ADD_COMPILE_OPTIONS ( -Wall -Wextra -Werror -Wno-unused-parameter )
ENDIF ()

FIND_PACKAGE (Threads	REQUIRED)
FIND_PACKAGE (OpenCV	REQUIRED)
FIND_LIBRARY (DARKHELP	darkhelp)
FIND_LIBRARY (DARKNET	darknet	)

INCLUDE_DIRECTORIES (${OpenCV_INCLUDE_DIRS})

FILE (GLOB SOURCE *.cpp)
LIST (SORT SOURCE)

ADD_EXECUTABLE (example ${SOURCE})
TARGET_LINK_LIBRARIES (example Threads::Threads ${DARKHELP} ${DARKNET} ${OpenCV_LIBS})
